%% To import in the preambule
%\usepackage{listings}

% "define" Tool
\lstdefinelanguage{tool}{
  alsoletter={@},
  morekeywords={abstract, case, catch, class, def, do, else, extends, false, final, finally, for, if, implicit, import, match, new, null, object, 
override, package, private, protected, public, requires, return, sealed, super, this, throw, throws, trait, try, true, type, val, var, while, with, yield, domain, postcondition, precondition, invariant, constraint, assert, forAll, in, _, return, @generator, ensure, require, ensuring },
  sensitive=true,
  morecomment=[l]{//},
  morecomment=[s]{/*}{*/},
  morestring=[b]"
}

\newcommand{\toolFont}{\small\sffamily}
\newcommand{\setToolListing}{
\lstset{
  frame=tb,
  language=tool,
  showstringspaces=false,
  columns=fixed,
  basewidth={0.44em,0.44em},
  mathescape=true,
  %captionpos=b
  basicstyle=\toolFont, % print whole listing in tt
  commentstyle=\rmfamily\itshape, % italic comments
} }
